package com.caiyouxi.app.controller;

import com.caiyouxi.app.model.AppInfoBean;
import com.caiyouxi.app.service.AppInfoSerivces;
import com.caiyouxi.common.bean.ResData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("app_info")
public class AppInfoController {
    @Autowired
    private AppInfoSerivces serivces;
    /**
     * 删除单条记录
     * */
    @RequestMapping("deleteByPrimaryKey")
    public ResData deleteByPrimaryKey(@RequestBody AppInfoBean bean){
        return serivces.deleteByPrimaryKey(bean);
    }

    /**
     * 添加
     * */
    @RequestMapping("add_app")
    public ResData add_app(@RequestBody AppInfoBean bean){
        return serivces.add_app(bean);
    }

    /**
     * 更新
     * */
    @RequestMapping("update_app")
    public ResData update_app(@RequestBody AppInfoBean bean){
        return serivces.update_app(bean);
    }

    /**
     * 查询单条记录
     * */
    @RequestMapping("get_app_by_id")
    public ResData get_app_by_id(@RequestBody AppInfoBean bean){
        return serivces.get_app_by_id(bean);
    }

    /**
     * 查询所有
     * */
    @RequestMapping("select_app_list")
    public ResData select_app_list(@RequestBody AppInfoBean bean){
        return serivces.select_app_list(bean);
    }
}
